<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var num=prompt("请输入打印行数：","");
        for(var i=1;i<=num;i++){
            for(var j=0;j<i;j++){
                document.write('*');
            }
            document.write('<br>');
        }
        /*for(var i=1;i<=10;i++){
            for(var j=1;j<=10-i;j++){
                document.write('&nbsp');
            }
            for(var k=1;k<=2*i-1;k++){
                document.write('*');
            }
            document.write('<br>');
        }*/
        /*var result=add(3,4);
        console.log(result);
        function add(num1,num2){
            return num1+num2;
        }*/
        /*function test(){
            var x="hello";
            var z=x+" "+y;
            console.log(z);
            var y="ly";
        }
        test();*/
        /*(function(a,b){
            console.log(a+b);
        })(2,3);*/
        /*function fun(a,b){
            console.log(arguments[0]+arguments[1]);
            console.log(arguments[2]);
        }
        fun(1,2)*/
        /*function fun(a,b){
            arguments=10;
            console.log(arguments[0]+arguments[1]);
        }
        fun(1,2)*/
        /*"use strict";
        function myFun1(a,b){
            arguments=1;
            return 0;
        }*/
        /*"use strict"
        try{
            num=10;
        }catch(err){
            console.log("错误信息："+err.message);
        }
        finally{
            console.log("最终都被执行。");
        }*/

    </script>
    
</body>
</html>